<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk">

<f:view>
<f:loadBundle var="text" basename="#{schoolClassList.bundleName}"/>
    <head>
        <title>#{text['schoolClassList.title']}</title>
        <meta name="heading" content="#{text['schoolClassList.heading']}"/>
        <meta name="menu" content="SchoolClassMenu"/>
    </head>
<body id="schoolClassList">
<h:form id="editSchoolClass">

<h:commandButton value="#{text['button.add']}" action="schoolClassForm" id="add" immediate="true" styleClass="button"/>
<h:commandButton value="#{text['button.done']}" action="mainMenu" id="cancel" immediate="true" styleClass="button" style="margin-left: 5px"/>

<t:dataTable id="schoolClasses" var="schoolClass" style="margin-top: 10px"
    value="#{schoolClassList.schoolClasses}" rows="25" sortColumn="#{schoolClassList.sortColumn}"
    sortAscending="#{schoolClassList.ascending}" styleClass="scrollerTable table"
    headerClass="standardTable_Header" rowClasses="standardTable_Row1,standardTable_Row2"
    columnClasses="standardTable_Column,standardTable_Column,standardTable_Column,standardTable_Column,standardTable_ColumnCentered">

    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="schoolClassId" arrow="true">
                <h:outputText value="#{text['schoolClass.schoolClassId']}" />
            </t:commandSortHeader>
        </f:facet>
        <h:commandLink action="#{schoolClassForm.edit}" value="#{schoolClass.schoolClassId}">
            <f:param name="schoolClassId" value="#{schoolClass.schoolClassId}"/>
            <f:param name="from" value="schoolClassList"/>
        </h:commandLink>
    </t:column>
        <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="campus" arrow="true">
                <h:outputText value="campus" />
            </t:commandSortHeader>
        </f:facet>
        <h:commandLink action="#" value="#{schoolClass.campus.name}">
        </h:commandLink>
    </t:column>    
    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="description" arrow="true">
                <h:outputText value="#{text['schoolClass.description']}" />
            </t:commandSortHeader>
        </f:facet>
    <h:outputText value="#{schoolClass.description}" escape="true"/>
    </t:column>
    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="half" arrow="true">
                <h:outputText value="#{text['schoolClass.half']}" />
            </t:commandSortHeader>
        </f:facet>
    <h:outputText value="#{schoolClass.half}" escape="true"/>
    </t:column>
    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="name" arrow="true">
                <h:outputText value="#{text['schoolClass.name']}" />
            </t:commandSortHeader>
        </f:facet>
    <h:outputText value="#{schoolClass.name}" escape="true"/>
    </t:column>
    <t:column>
        <f:facet name="header">
            <t:commandSortHeader columnName="year" arrow="true">
                <h:outputText value="#{text['schoolClass.year']}" />
            </t:commandSortHeader>
        </f:facet>
    <h:outputText value="#{schoolClass.year}" escape="true"/>
    </t:column>
</t:dataTable>

<ui:include src="/common/tableFooter.xhtml">
    <ui:param name="tableName" value="schoolClasses"/>
</ui:include>

<script type="text/javascript">
    highlightTableRows("editSchoolClass:schoolClasses");
</script>

</h:form>
</body>
</f:view>
</html> 